3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to multiply a vector by a floating-point scalar value.
You can use the Q3Vector2D_Scale function to scale a two-dimensional vector.
TQ3Vector2D *Q3Vector2D_Scale (
const TQ3Vector2D *vector2D,
float scalar,
TQ3Vector2D *result);
The Q3Vector2D_Scale function returns, as its function result and in the result parameter, the two-dimensional vector that is the result of multiplying each of the components of the vector vector2D by the value of the scalar parameter. Note that on entry the result parameter can be the same as the vector2D parameter.
You can use the Q3Vector3D_Scale function to scale a three-dimensional vector.
TQ3Vector3D *Q3Vector3D_Scale (
const TQ3Vector3D *vector3D,
float scalar,
TQ3Vector3D *result);
The Q3Vector3D_Scale function returns, as its function result and in the result parameter, the three-dimensional vector that is the result of multiplying each of the components of the vector vector3D by the value of the scalar parameter. Note that on entry the result parameter can be the same as the vector3D parameter.
Previous | QD3D Book | Overview | Chapter Contents | Next |